﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
   public  class DispatcherName
    {       
       //Код другий
       public int ID { get; set; }      
       //Основний засіб
       public string Resourcse { get; set; }
       //Назва кода першого
       public string NameOrigin { get; set; }
       //Код перший
       public string CodeOrigin { get; set; }
       //Назва кода другого
       public string NameCode { get; set; }

       public Dictionary<string, string> ResourcseFields { get; private set; }
       public Dictionary<string, string> DispatcherNameFields { get; private set; }

       DispatcherName() { }
       DispatcherName(string resourcse, string nameOrigin, string codeOrigin, string nameCode) 
           : this(0, resourcse, nameOrigin, codeOrigin, nameCode) { }
       DispatcherName(int id, string resourcse, string nameOrigin, string codeOrigin, string nameCode) 
       {
           this.ID = id;
           this.Resourcse = resourcse;
           this.NameOrigin = nameOrigin;
           this.CodeOrigin = codeOrigin;
           this.NameCode = nameCode;

           ResourcseFields = new Dictionary<string, string>(1);
           ResourcseFields.Add("Resourcse", Resourcse);

           DispatcherNameFields = new Dictionary<string, string>(3);
           DispatcherNameFields.Add("NameOrigin", NameOrigin);
           DispatcherNameFields.Add("CodeOrigin", CodeOrigin);
           DispatcherNameFields.Add("NameCode", NameCode);
       }

    }
}
